<template>
        <div>
            <!-- 子组件
            fu是父组件传递的数据 -->
            <div>{{ props.fu }}</div>
            <p>
                <button @click="zi">子传父</button>
            </p>
        </div>
</template>
    
<script setup lang='ts'>
import {defineProps,defineEmits} from 'vue'
const props=defineProps({fu:String})

const emit=defineEmits(['zi'])
const zi=()=>{
    let params={
        content:'b2222'
    }
    emit('zi',params)
}

    
</script>
    
<style>
    
</style>